/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wbd_au.objects_mappings;

import java.sql.Date;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;

/**
 *
 * @author Iza
 */
public class Posilki implements SQLData{
    int idZolnierz;
    int idStolowka;
    int idPakietZywieniowy;
    Date data;
    
    String sqlType;

    @Override
    public String getSQLTypeName() {
        return sqlType;
    }

    @Override
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
        sqlType = typeName;

        idZolnierz = stream.readInt();
        idStolowka = stream.readInt();
        idPakietZywieniowy = stream.readInt();
        data = stream.readDate();
        
    }

    @Override
    public void writeSQL(SQLOutput stream) throws SQLException {
       stream.writeInt(idZolnierz);
       stream.writeInt(idStolowka);
       stream.writeInt(idPakietZywieniowy);
       stream.writeDate(data);
   }
}
